home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap09 / Paint7 / Paint7Doc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  895 b   |  39 lines

  1. //***********************************************************************
  2. //
  3. //  Paint7Doc.h
  4. //
  5. //***********************************************************************
  6.  
  7. class CPaintDoc : public CDocument
  8. {
  9.     DECLARE_DYNCREATE (CPaintDoc)
  10.  
  11. private:
  12.     UINT m_nWidth;
  13.     UINT m_nColor;
  14.     CObArray m_lineArray;
  15.  
  16.     void InitWidthAndColor ();
  17.  
  18. public:
  19.     static const COLORREF m_crColors[8];
  20.  
  21.     CPaintDoc ();
  22.     virtual BOOL OnNewDocument ();
  23.     virtual BOOL OnOpenDocument (LPCTSTR);
  24.     virtual void DeleteContents ();
  25.     virtual void Serialize (CArchive&);
  26.  
  27.     CLine* AddLine (CPoint, CPoint);
  28.     CLine* GetLine (int);
  29.     int GetLineCount ();
  30.  
  31. protected:
  32.     afx_msg void OnWidth (UINT);
  33.     afx_msg void OnColor (UINT);
  34.     afx_msg void OnUpdateWidthUI (CCmdUI*);
  35.     afx_msg void OnUpdateColorUI (CCmdUI*);
  36.  
  37.     DECLARE_MESSAGE_MAP ()
  38. };
  39.